test: enhance lineage spec to cover all the missing cases#26796
test: enhance lineage spec to cover all the missing cases#26796chirag-madlani merged 29 commits intofix-column-filteringfrom
Conversation
| SearchIndex: 'searchIndex', | ||
| ApiEndpoint: 'apiEndpoint', | ||
| Metric: 'metric', | ||
| ['Store Procedure']: 'storedProcedure', |
There was a problem hiding this comment.
⚠️ Bug: Typo 'Store Procedure' should be 'Stored Procedure'
The search index mapping key ['Store Procedure'] is missing the 'd'. The rest of the codebase (e.g., importUtils.ts, class names) consistently uses 'Stored Procedure'. This mismatch will cause entity type lookups to fail for stored procedures, as getEntityTypeSearchIndexMapping('Stored Procedure') will return undefined.
Suggested fix:
Change:
['Store Procedure']: 'storedProcedure',
To:
['Stored Procedure']: 'storedProcedure',
Was this helpful? React with 👍 / 👎 | Reply gitar fix to apply this suggestion
🔴 Playwright Results — 83 failure(s), 21 flaky✅ 3455 passed · ❌ 83 failed · 🟡 21 flaky · ⏭️ 208 skipped
Genuine Failures (failed on all attempts)❌
|
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineagev1.spec.ts
Outdated
Show resolved
Hide resolved
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineagev1.spec.ts
Outdated
Show resolved
Hide resolved
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineagev1.spec.ts
Outdated
Show resolved
Hide resolved
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineagev1.spec.ts
Outdated
Show resolved
Hide resolved
| test.beforeAll(async ({ browser }) => { | ||
| const { apiContext } = await getDefaultAdminAPIContext(browser); | ||
| await table.create(apiContext); | ||
| }); |
There was a problem hiding this comment.
💡 Quality: Missing afterAll cleanup for table created in beforeAll
The newly added test.beforeAll in the 'Lineage Settings modal' block (DataAssetLineage.spec.ts:455-458) creates a TableClass entity but there is no corresponding test.afterAll to delete it. The same issue exists in PlatformLineage.spec.ts (line 35-38) where the table creation was moved to the top-level scope without adding cleanup.
While this follows the existing pattern in the file (no other describe block has afterAll either), it leaves orphaned test entities in the system between runs, which can cause flaky tests or data buildup in CI environments.
Suggested fix:
// DataAssetLineage.spec.ts — add after the beforeAll block:
test.afterAll(async ({ browser }) => {
const { apiContext } = await getDefaultAdminAPIContext(browser);
await table.delete(apiContext);
await afterAction();
});
// Same pattern for PlatformLineage.spec.ts
Was this helpful? React with 👍 / 👎 | Reply gitar fix to apply this suggestion
|
|
❌ Playwright Lint Check Failed — ESLint + Prettier + Organise ImportsThe following files have style issues that need to be fixed: Fix locally (fast — changed files only): cd openmetadata-ui/src/main/resources/ui
yarn ui-checkstyle:playwright:changedOr to fix all playwright files: |
Code Review
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Gitar



Describe your changes:
Fixes
I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>Summary by Gitar
Lineagev1.spec.tswith 30+ test cases covering lineage creation, filtering, and interactions across 15+ entity typesgetDefaultAdminAPIContexthelper for API context initializationgetEntityTypeSearchIndexMappingto support 5 new entity types (Directory, File, Spreadsheet, Worksheet, StoredProcedure)verifyExportLineageCSVto accept generic entity arrayspatchmethod inMetricClassfor entity metadata updatesplaywright.config.tsto filter and run lineage-specific testsThis will update automatically on new commits.